<?php foreach ($sections as $section): ?>
	<h2><?php echo $section->name; ?></h2>
	<p><small>ID: <?php echo $section->id; ?>, <a href="<?php echo URL::site(Route::get('backend')->uri(array(
		
	))); ?>">редактировать</a></small></p>
	<table class="default">
		<thead>
			<tr>
				<?php foreach ($columns as $column => $data): ?>
					<td><?php echo $column; ?></td>
				<?php endforeach; ?>
				<td></td><td></td>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($cats as $cat): if ($cat->section_id == $section->id): ?>
			<tr>
				<?php foreach ($columns as $column => $data): ?>
					<td><?php
						if ($column == 'section_id')
							echo $cat->{$column}.': '.$cat->section->name;
						else
							echo Text::limit_chars(strip_tags($cat->{$column}), 128, '...'); 
					?></td>
				<?php endforeach; ?>
				<td><a href="<?php echo URL::site(Route::get('backend')->uri(array('controller' => 'forum', 'action' => 'cat_edit', 'par1' => $cat->id))); ?>">ред.</a></td>
				<td><a href="<?php echo URL::site(Route::get('backend')->uri(array('controller' => 'forum', 'action' => 'cat_delete', 'par1' => $cat->id))); ?>" onclick="return confirm('Подтверждаете удаление?');">удал.</a></td>
			</tr>
			<?php endif; endforeach; ?>
		</tbody>
	</table>
	<p>&nbsp;</p>
<?php endforeach; ?>